const { contextBridge, ipcRenderer } = require('electron');

contextBridge.exposeInMainWorld('electronAPI', {
  // 创建测试窗口
  createTestWindow: () => ipcRenderer.invoke('create-test-window'),
  
  // 关闭所有测试窗口
  closeAllTestWindows: () => ipcRenderer.invoke('close-all-test-windows'),
  
  // 获取当前窗口信息
  getWindowInfo: () => ({
    userAgent: navigator.userAgent,
    platform: process.platform,
    isDev: process.env.NODE_ENV === 'development'
  })
});
